package com.scs.application.modules.dept.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.scs.application.core.entity.DataEntity;
import com.scs.application.modules.upgrade.db.annotation.EntityClassAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityFieldAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityIndexAnnotation;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 */
@Data
@Accessors(chain = true)
@TableName("dept_his_bill")
@EntityClassAnnotation(remark = "HIS收费明细表")
@EntityIndexAnnotation(ix = {"his_key","sn","matr_code_his","dept_code_patient","dept_code_op","bill_date","oprt_code","patient_code","matr_name_his","dept_name_patient","dept_name_op","patient_name","inpatient_no","outpatient_no","patient_bed_no"})
public class HisBill extends DataEntity {

    // id ,在父类中处理
    @EntityFieldAnnotation(
            text = "his收费流水号",
            length = "100",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String hisKey;

    @EntityFieldAnnotation(
            text = "his单据号",
            length = "100",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String refKey;
    // id ,在父类中处理
    @EntityFieldAnnotation(
            text = "收费项目代码（HIS中唯一字段）",
            length = "50",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String matrCodeHis;

    @EntityFieldAnnotation(
            text = "收费项目名称",
            length = "200",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String matrNameHis;

    @EntityFieldAnnotation(
            text = "状态：0:耗材 1:药品 ",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Integer  billType;


    @EntityFieldAnnotation(
            text = "类型：1:计费 -1:退费 ",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Integer  billFlag;


    @EntityFieldAnnotation(
            text = "(SPD系统）唯一码，有的话为高值",
            length = "50",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String sn;

    @EntityFieldAnnotation(
            text = "收费价格",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Double price;

    @EntityFieldAnnotation(
            text = "收费数量",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Double qty;

    @EntityFieldAnnotation(
            text = "扫码消耗数量",
            length = "",
            not_null = false,
            default_value = "0",
            comment = ""
    )
    private Integer scanQty;

    @EntityFieldAnnotation(
            text = "消耗科室代码（病人所属科室）",
            length = "30",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String deptCodePatient;
    @EntityFieldAnnotation(
            text = "消耗科室名称",
            length = "100",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String deptNamePatient;

    @EntityFieldAnnotation(
            text = "开单科室代码(手术室,介入室等)",
            length = "30",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String deptCodeOp;

    @EntityFieldAnnotation(
            text = "开单科室名称",
            length = "100",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String deptNameOp;

    @EntityFieldAnnotation(
            text = "记账日期",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Date billDate;

    @EntityFieldAnnotation(
            text = "手术单号",
            length = "30",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String oprtCode;

    @EntityFieldAnnotation(
            text = "患者代码（HIS系统中唯一）",
            length = "30",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String patientCode;

    @EntityFieldAnnotation(
            text = "患者名称",
            length = "30",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String patientName;

    @EntityFieldAnnotation(
            text = "是否是耗材",
            length = "",
            not_null = false,
            default_value = "0",
            comment = "1：是耗材"
    )
    private Boolean flagMatr;


    @EntityFieldAnnotation(
            text = "计费人",
            length = "30",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String execUser;

    @EntityFieldAnnotation(
            text = "是否SPD与HIS比对",
            length = "",
            not_null = false,
            default_value = "0",
            comment = "是否比较过HIS"
    )
    private Boolean flagComparison;


    @EntityFieldAnnotation(
            text = "备注",
            length = "200",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String remark;

    //新增门诊号与住院号两个字段
    @EntityFieldAnnotation(
            text = "住院号",
            length = "30",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String inpatientNo;
    @EntityFieldAnnotation(
            text = "门诊号",
            length = "30",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String outpatientNo;
    @EntityFieldAnnotation(
            text = "患者性别",
            length = "30",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String patient_gender;
    @EntityFieldAnnotation(
            text = "患者年龄",
            length = "30",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String patient_age;
    @EntityFieldAnnotation(
            text = "床位号",
            length = "30",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String patient_bed_no;
}
